import tkinter as tk
from PIL import Image, ImageTk

from Attriabte import Color


class MainWindow:
    """
    程序主窗口
    """

    def __init__(self):
        self.MainWidow = tk.Tk()
        self.MainWidow.title("单词背诵国")
        tk.Label(self.MainWidow,bg=Color.default_bg).place(
            relx=0,
            rely=0,
            relwidth=1,
            relheight=1
        )
        self.MainWidow.geometry("974x573")

        self.image_left = ImageTk.PhotoImage(Image.open('./resource/image/left.png').resize((80, 80)))
        self.image_center = ImageTk.PhotoImage(Image.open('./resource/image/center.png').resize((80, 80)))
        self.image_right = ImageTk.PhotoImage(Image.open('./resource/image/right.png').resize((80, 80)))
        self.image_328= ImageTk.PhotoImage(Image.open('./resource/image/328.png').resize((80, 80)))
        self.image_324= ImageTk.PhotoImage(Image.open('./resource/image/324.png').resize((80, 80)))
        self.down_arrow = ImageTk.PhotoImage(Image.open('./resource/image/down.png').resize((40, 30)))
        self.up_arrow = ImageTk.PhotoImage(Image.open('./resource/image/up.png').resize((40, 30)))
        self.sound = ImageTk.PhotoImage(Image.open('./resource/image/sound.png').resize((40, 30)))

    def show(self):
        self.MainWidow.mainloop()
